import request from '@/utils/request'

//获取新闻公告分页列表
export function getJournalismPageList(data) {
	return request({
		method: 'get',
		url: 'tbSysJournalism/queryPageList',
		params: data
	})
}

//添加新闻公告
export function addedJournalism(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/add',
		data
	})
}

//修改新闻公告
export function updateJournalism(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/update',
		data
	})
}

//删除新闻公告
export function deleteJournalism(id) {
	return request({
		method: 'get',
		url: 'tbSysJournalism/delete/' + id
	})
}

//获取新闻公告详情
export function queryJournalism(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/queryInfo',
		data
	})
}

//修改新闻公告状态
export function updateJournalismStatus(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/updateDel',
		data
	})
}

//修改新闻公告序号
export function updateJournalismSort(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/updateSort',
		data
	})
}

//修改新闻公告置顶
export function updateJournalismTop(data) {
	return request({
		method: 'post',
		url: 'tbSysJournalism/updateTop',
		data
	})
}